﻿using HPIT.RentHouse.Common;
using HPIT.RentHouse.DTO;
using HPIT.RentHouse.IService;
using HPIT.RentHouse.Service.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HPIT.RentHouse.Service
{
    public class UserService : IUserService
    {
        public AjaxResult SendEmail(string email)
        {
            int result = QQHelper.SendEmail(email, "掌上租NET200702", "恭喜你注册掌上租成功，可领取一百万");
            if (result > 0)
            {
                return new AjaxResult(ResultState.Success, "发送成功");
            }
            else
            {
                return new AjaxResult(ResultState.Error, "发送失败");
            }
        }

        public AjaxResult SendSMS(string mobile)
        {
            string result = KewaiHelper.SendSMS(mobile);
            return new AjaxResult(ResultState.Success, "发送成功");
        }
    }
}
